#include "Item_Cluster.h"
#include "Log.h"

Cluster_Metric Item_Cluster::metric_function(Cluster_Distance::AVERAGE,
                                             Representative_Set::WHOLE);

Item_Cluster::Item_Cluster(Cluster *object) {
    this->object = object;
}

double Item_Cluster::metric(const Metric_Object *other) const {
    LOG_ENTER(OBJECT, "Item_Cluster::distance");

    Cluster *other_object = ((Item_Cluster*)other)->object;
    double result = metric_function.distance(object, other_object);

    LOG_EXIT();
    return result;
}

